package org.vt.eldercare.ui;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class NodeConfigFilter extends FileFilter {
	
	private static final String DESCRIPTION_TEXT = "Node Configuration Files (*.nodeconfig)";

	@Override
	public boolean accept(File arg0) {
		if (arg0.isDirectory()) {
			return true;
		}
		String extension = Utils.getExtension(arg0);
		if (extension != null) {
			if (extension.equals(Utils.nodeconfig)) {
				return true;
			}
		}
		return false;
	}

	@Override
	public String getDescription() {
		return DESCRIPTION_TEXT;
	}

}
